<template>
  <BaseCheckbox v-model:checked="checked"></BaseCheckbox>
  {{checked}}
</template>

<script>
import { createApp, ref, reactive, computed, onMounted, onUnmounted } from 'vue';

const BaseCheckbox = {
  name: 'BaseCheckbox',
  props: {
    checked: Boolean
  },
  template: `
    <input
        type="checkbox"
        :checked="checked"
        @change="$emit('update:checked', $event.target.checked)"
    >
  `
}
export default {
  name: "BaseVmodel",
  components: {BaseCheckbox},
  setup() {
    const checked = ref(true)
    return {checked}
  }
}
</script>

<style scoped>

</style>